<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
		<script type="text/javascript" src="js/jquery-1.2.6.js"></script>
		<script type="text/javascript" src="js/chinese.js"></script>
		<link type="text/css" rel="stylesheet" href="style/style.css" />
		<title></title>
</head>
<body class="gui">

<div id="wrapper">
<div id="content">
	<div id="header">
<div id="logo">
<h1>Control Panel</h1>
</div>
<div id="mainMenu">
	<span><a id="nets" href="wan.htm"><img id="net" src="images/net_small.png" border="0"></a></span>
	<span><a id="cdrs" href="Dialing.htm"><img id="cdr" src="images/cdr_big.png" border="0"></a></span>
	<span><a id="manages" href="downlog.htm"><img id="manage" src="images/manage_small.png" border="0"></a></span>
</div>
<div id="menu">
 <div id="menuMain">
  <ul id="menuMainList">
  	<li><a href="Dialing.htm"><strong><script type="text/javascript">Capture(ivr_menu.basic)</script></strong></a></li>
   	<li><a href="extension.htm"><strong><script type="text/javascript">Capture(ivr_menu.extension_config)</script></strong></a></li>
   	<li class="current"><span><strong><script type="text/javascript">Capture(ivr_menu.trunk_config)</script></strong></span>
   		<div id="menuSub">
     		<ul id="menuSubList">
     			<li id="lineshow"><a href="trunk.htm"><strong><script type="text/javascript">Capture(ivr_menu.trunk)</script></strong></a></li>
      		<li><a href="ip_trunk.htm"><strong><script type="text/javascript">Capture(ivr_menu.ip_trunk)</script></strong></a></li>
      		<li><a href="ip_trunk_reg.htm"><span><strong><script type="text/javascript">Capture(ivr_menu.trunk_reg)</script></strong></span></a></li>
     		</ul>
    	</div>
   		</li>
   	<!--<li><a href="tietrunk.htm"><strong><script type="text/javascript">Capture(ivr_menu.tietrunk)</script></strong></a></li>-->
   	<li><a href="Analog_trunk.htm"><strong><script type="text/javascript">Capture(ivr_menu.system)</script></strong></a></li>
   	<li><a href="Systemcfg.htm"><strong><script type="text/javascript">Capture(ivr_menu.advanced)</script></strong></a></li>
  </ul>
 </div>
</div>
</div>
<div id="main">
<div id="contents">
<form name="filters" action="#" method="post" >
<fieldset>
<legend><script type="text/javascript">Capture(sip_trunk.table1_title)</script></legend>
<div class="frame_tab_layer">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="cmenutitle">
 <tr id="tr476">
<td class="frame_tab_left">
<span class="errormsg" id="img476">&#160;</span><label for = "id476" ><script type="text/javascript">Capture(sip_trunk.table1_td1)</script></label>
</td>
<td id="td476" class="frame_tab_right">
<input type="text" name="id476" onchange="changeport();"/>
</td>
</tr>
<tr id="tr478">
<td class="frame_tab_left">
<span class="errormsg" id="img478">&#160;</span><label for = "id478" ><script type="text/javascript">Capture(sip_trunk.table1_td2)</script></label>
</td>
<td id="td478" class="frame_tab_right">
<input type="text" name="id478" id="value478" />
<span id="msg478">&#160;</span>
</td>
</tr>
<tr id="tr479">
<td class="frame_tab_left">
<span class="errormsg" id="img479">&#160;</span><label for = "id479" ><script type="text/javascript">Capture(sip_trunk.table1_td3)</script></label>
</td>
<td id="td479" class="frame_tab_right">
<input type="text" name="id479" />
<span id="msg479">&#160;</span>
</td>
</tr>
<tr id="tr477">
<td class="frame_tab_left">
<span class="errormsg" id="img477">&#160;</span><label for = "id477" ><script type="text/javascript">Capture(sip_trunk.table1_td4)</script></label>
</td>
<td id="td477" class="frame_tab_right">
<input type="text" name="id477" />
<span id="msg477">&#160;</span>
</td>
</tr>
<tr id="tr325">
<td class="frame_tab_left">
<span class="errormsg" id="img325">&#160;</span><label for = "id325" ><script type="text/javascript">Capture(sip_trunk.table1_td5)</script></label>
</td>
<td id="td325" class="frame_tab_right">
<select name="id325">
	<option>0</option>
	<option>1</option>
	<option>2</option>
	<option>3</option>
	<option>4</option>
	<option>5</option>
	<option>6</option>
	<option>7</option>
	<option>8</option>
	<option>9</option>
	<option>10</option>
</select>
<span id="msg325">&#160;</span>
</td>
</tr>
</table>
</div>
</fieldset>
<fieldset>
<legend><script type="text/javascript">Capture(sip_trunk.table2_title)</script></legend>
<div class="frame_tab_layer">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="cmenutitle">
 <tr width="100%" id="tr480">
<td class="frame_tab_left">
<span class="errormsg" id="img480">&#160;</span><label for = "id480" ><script type="text/javascript">Capture(sip_trunk.table2_td2)</script></label>
</td>
<td id="td480" class="frame_tab_right">
<input type="text" name="id480" />
<span id="msg480">&#160;</span>
</td>
</tr>
<tr id="tr108">
<td class="frame_tab_left">
<span class="errormsg" id="img108">&#160;</span><label for = "id108" ><script type="text/javascript">Capture(sip_trunk.table2_td3)</script></label>
</td>
<td id="td108" class="frame_tab_right">
<nobr>
<input type="text" name="id108" />
<span id="msg108">&#160;</span>
</td>
</tr>
<tr id="tr109">
<td class="frame_tab_left">
<span class="errormsg" id="img109">&#160;</span><label for = "id109" ><script type="text/javascript">Capture(sip_trunk.table2_td4_1)</script><b><i><script type="text/javascript">Capture(sip_trunk.table2_td4_2)</script></i></b>&#160;<script type="text/javascript">Capture(sip_trunk.table2_td4)</script></label>
</td>
<td id="td109" class="frame_tab_right">
<input type="radio" name="id109" value="yes" />
<script type="text/javascript">Capture(sip_trunk.table2_td4_option1)</script>
<span style="padding-left:50px;">&#160;</span>
<input type="radio" name="id109" value="no" />
<script type="text/javascript">Capture(sip_trunk.table2_td4_option2)</script>				
</td>
</tr>
</table>
</div>
</fieldset>
<fieldset>
<legend><script type="text/javascript">Capture(sip_trunk.table4_title)</script></legend>
<div class="frame_tab_layer">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="cmenutitle">
 <tr width="100%" id="tr322">
<td class="frame_tab_left">
<span class="errormsg" id="img322">&#160;</span>
<label for = "id322" ><script type="text/javascript">Capture(sip_trunk.table4_td1)</script></label>
</td>
<td id="td322" class="frame_tab_right">
<input type="checkbox" name="id322" />
<span id="msg322">&#160;</span>
</td>
</tr>
</table>
</div>
</fieldset>
<fieldset>
<legend><script type="text/javascript">Capture(sip_trunk.secondserver)</script></legend>
<div class="frame_tab_layer">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="cmenutitle">
<tr id="tr680">
   <td class="frame_tab_left">
	  	<span class="errormsg" id="img680">&#160;</span><label for = "id680" ><script type="text/javascript">Capture(sip_trunk.table3_td1)</script></label>
	 </td>
   <td class="frame_tab_right"; id="td680">
	  <select name="id680" id="id680" onchange="read();">
	  	<option value="0"><script type="text/javascript">Capture(sip_trunk.table3_td1_option1)</script></option>
	  	<option value="1"><script type="text/javascript">Capture(sip_trunk.table3_td1_option2)</script></option>
	  	<option value="2"><script type="text/javascript">Capture(sip_trunk.table3_td1_option3)</script></option>
	  	</select>
		<span id="msg680">&#160;</span>
	 </td>
	</tr>
	<tr width="100%" id="tr327">
<td class="frame_tab_left">
<span class="errormsg" id="img327">&#160;</span><label for = "id327" ><script type="text/javascript">Capture(sip_trunk.table2_td1)</script></label>
</td>
<td id="td327" class="frame_tab_right">
<input type="text" name="id327" />
<span id="msg327">&#160;</span>
</td>
</tr>
	<tr id="tr681">
   <td class="frame_tab_left">
	  	<span class="errormsg" id="img681">&#160;</span><label for = "id681" ><script type="text/javascript">Capture(sip_trunk.table3_td5)</script></label>
	 </td>
   <td class="frame_tab_right"; id="td681">
	  <input type="radio" name="id681" id="radio681_1" value="0" onclick="read681();"/><script type="text/javascript">Capture(sip_trunk.table3_td5_option1)</script>
	  <span style="padding-left:10px;"></span>
	  <input type="radio" name="id681" id="radio681_2" value="1" onclick="read681();"/><script type="text/javascript">Capture(sip_trunk.table3_td5_option2)</script>
		<span id="msg681" style="padding-left:5px;"></span>
		<font id="f681" style="display:none">&#160;<input type="text"  name="t681" size="4" maxlength="4"/>&#160;<script type="text/javascript">Capture(sip_trunk.table3_td5_note)</script></font>
	 </td>
	</tr>
	<tr id="tr682">
   <td class="frame_tab_left">
	  	<span class="errormsg" id="img682">&#160;</span><label for = "id682" ><script type="text/javascript">Capture(sip_trunk.table3_td6)</script></label>
	 </td>
   <td class="frame_tab_right"; id="td682">
	  <input type="text" name="id682"/>
		<span id="msg682">&#160;</span>
	 </td>
	</tr>
	<tr id="tr683">
   <td class="frame_tab_left">
	  	<span class="errormsg" id="img683">&#160;</span><label for = "id683" ><script type="text/javascript">Capture(sip_trunk.table3_td7)</script></label>
	 </td>
   <td class="frame_tab_right"; id="td683">
	  <input type="text" name="id683"/>
		<span id="msg683">&#160;</span>
	 </td>
	</tr>
 	<tr id="tr684">
   <td class="frame_tab_left">
	  	<span class="errormsg" id="img684">&#160;</span><label for = "id684" ><script type="text/javascript">Capture(sip_trunk.table3_td8)</script></label>
	 </td>
   <td class="frame_tab_right"; id="td684">
	  <input type="text" name="id684"/>
		<span id="msg684">&#160;</span>
	 </td>
	</tr>
	<!--<tr id="tr643">
   <td class="frame_tab_left">
	  	<span class="errormsg" id="img643">&#160;</span><label for = "id643" ><script type="text/javascript">Capture(sip_trunk.table3_td2)</script></label>
   <td class="frame_tab_right"; id="td643">
	  <input type="checkbox" name="id643"/>
		<span id="msg643">&#160;</span>
	 </td>
	</tr>-->
	<tr id="tr687">
   <td class="frame_tab_left">
	  	<span class="errormsg" id="img687">&#160;</span><label for = "id687" ><script type="text/javascript">Capture(sip_trunk.table3_td3)</script></label>
	 </td>
   <td class="frame_tab_right"; id="td687">
	  <input type="text" name="id687"/>
		<span id="msg687">&#160;</span>
	 </td>
	</tr>
	<tr id="tr686">
   <td class="frame_tab_left">
	  	<span class="errormsg" id="img686">&#160;</span><label for = "id686" ><script type="text/javascript">Capture(sip_trunk.table3_td9)</script></label>
	 </td>
   <td class="frame_tab_right"; id="td686">
	  <input type="checkbox" name="id686"/>
		<span id="msg686">&#160;</span>
	 </td>
	</tr>
	<tr id="tr685">
   <td class="frame_tab_left">
	  	<span class="errormsg" id="img685">&#160;</span><label for = "id685" ><script type="text/javascript">Capture(sip_trunk.table3_td10)</script></label>
	 </td>
   <td class="frame_tab_right"; id="td685">
	  <input type="radio" name="id685" value="yes"/><script type="text/javascript">Capture(sip_trunk.table3_td10_option1)</script>
	  <span style="padding-left:20px;"></span>
	  <input type="radio" name="id685" value="no"/><script type="text/javascript">Capture(sip_trunk.table3_td10_option2)</script>
	 </td>
	</tr>
</table>
</div>
</fieldset>
<br/><br/>
		<div class="submitFooter">
<script type="text/javascript">
//<![CDATA[
submitFooterButton(1,0);
//]]>
</script>
</div>
</form>
</div>
</div>
<br/>
<div id="helpContainer">
<div id="help">
<div><h2><img src="images/help_title.png" border="0"><script type="text/javascript">Capture(share.help)</script></h2></div>
<dl>
<dt class="term"><script type="text/javascript">Capture(sip_trunk.table1_td1)</script></dt>
<dd class="definition"><script type="text/javascript">Capture(sip_trunk.table1_td1_note1)</script><script type="text/javascript">Capture(sip_trunk.table1_td1_note2)</script></dd>
<dt class="term"><script type="text/javascript">Capture(sip_trunk.table1_td2)</script></dt>
<dd class="definition"><script type="text/javascript">Capture(sip_trunk.table1_td2_note)</script></dd>
<dt class="term"><script type="text/javascript">Capture(sip_trunk.table1_td3)</script></dt>
<dd class="definition"><script type="text/javascript">Capture(sip_trunk.table1_td3_note)</script></dd>
<dt class="term"><script type="text/javascript">Capture(sip_trunk.table1_td4)</script></dt>
<dd class="definition"><script type="text/javascript">Capture(sip_trunk.table1_td4_note)</script></dd>
<dt class="term"><script type="text/javascript">Capture(sip_trunk.table1_td5)</script></dt>
<dd class="definition"><script type="text/javascript">Capture(sip_trunk.table1_td5_note1)</script><script type="text/javascript">Capture(sip_trunk.table1_td5_note2)</script></dd>
<dt class="term"><script type="text/javascript">Capture(sip_trunk.table2_td1)</script></dt>
<dd class="definition"><script type="text/javascript">Capture(sip_trunk.table2_td1_note)</script></dd>
<dt class="term"><script type="text/javascript">Capture(sip_trunk.table2_td2)</script></dt>
<dd class="definition"><script type="text/javascript">Capture(sip_trunk.table2_td2_note)</script></dd>
<dt class="term"><script type="text/javascript">Capture(sip_trunk.table2_td3)</script></dt>
<dd class="definition"><script type="text/javascript">Capture(sip_trunk.table2_td3_note)</script></dd>
<dt class="term"><script type="text/javascript">Capture(sip_trunk.table3_td3)</script></dt>
<dd class="definition"><script type="text/javascript">Capture(sip_trunk.table3_td3_note)</script></dd>
<dt class="term"><script type="text/javascript">Capture(sip_trunk.table3_td11)</script></dt>
<dd class="definition"><script type="text/javascript">Capture(sip_trunk.table3_td11_note)</script></dd>
<dt class="term"><script type="text/javascript">Capture(sip_trunk.table3_td12)</script></dt>
<dd class="definition"><script type="text/javascript">Capture(sip_trunk.table3_td12_note)</script></dd>
</dl>
</div>
</div>

<div id="floatKiller"></div>
<div id="statusInfo">

<div class="info"><span id="loginuser"></span></div>
<!--<div class="info"><script type="text/javascript">Capture(share.logintime)</script><span id="uptime"></span></div>-->
<div class="info"><button class="logout" onclick="reboot();"><img src="images/reboot.gif" border="0">&#160;<script type="text/javascript">Capture(tools.td10)</script></button><button class="logout" onclick="logout();"><img src="images/logout.gif" border="0">&#160;<script type="text/javascript">Capture(share.logout)</script></button></div>
</div>

</div>
</div>
<div id="lock_div">&nbsp; </div>
<div id="lock_div2">&nbsp;</div>
<div id="message_panel"><span id="mess">&nbsp;</span><br/>
  <br/>
  <img src="images/jd.gif"/>
</div><script type="text/javascript">
	setTimeout("height_div()",500);
	ivr_load();
		</script>
<script type="text/javascript" src="lib.js"></script>
<script type="text/javascript" src="js/message_panel.js"></script>
<script type="text/javascript">
	if(lineshow("4001")){
	var nonames = new Array("submit","radio491","t681","id680","id327");
	var sendtext = getSendText(nonames);
	sendtext+="&id=680&id=327";
	DataRequest("get_json",sendtext,function(data){
  	getResult(nonames,data);
  	if(data["id681"]=="0"){
		$("#radio681_1").attr("checked",true);
	}else{
		$("#radio681_2").attr("checked",true);
		$("[name=t681]").attr("value",data["id681"]);
	}
	var value327 = data["id327"];
	var value680 = data["id680"];
	if(value327==""&&value680=="0"){
		listselect("id680","0");
	}else if(value327==""&&value680=="1"){
		listselect("id680","2");
	}else{
		listselect("id680","1");
		updatecfgvalue("id327",value327);
	}
	read();
    read681();
  });
 }
	
	$("[name=submit]").click(function () {
		$(".errormsg").html('');
		var nonames = new Array("submit","t681","id681","id680");
		var settext = getSetText(nonames);
		if($("[name=t681]").val()!=""&&$("[name=t681]").val()!="0"){
        	settext += "&id681="+$("[name=t681]").val();
        }else{
        	settext += "&id681=0";
        }
        
  	if($("[name=id680]").val()=="0"){
        		settext+="&id680=0";
      		}else if($("[name=id680]").val()=="1"){
        		settext+="&id680=0";
      		}else if($("[name=id680]").val()=="2"){
        		settext+="&id680=1";
      		}
		settext=settext.replace(/\#/g,"%23");
		submitform(modules["set_data"],settext);
	});
	
	function read(){
	var value478=$("[name=id478]").attr("value");
	if(value478!="")$("[name=id477]").attr("value",value478);
		if($("[name=id680]").val()=="0"){
				$("[name=id327]").attr("value","");
				$("#tr327").hide();
				$("#tr687").hide();
				$("#tr681").hide();
				$("#tr682").hide();
				$("#tr683").hide();
				$("#tr684").hide();
				$("#tr685").hide();
				$("#tr686").hide();
			}else if($("[name=id680]").val()=="1"){
				$("#tr681").hide();
				$("#tr682").hide();
				$("#tr683").hide();
				$("#tr684").hide();
				$("#tr685").hide();
				$("#tr686").hide();
				$("#tr327").show();
				$("#tr687").hide();
			}else if($("[name=id680]").val()=="2"){
				$("[name=id327]").attr("value","");
				$("#tr681").show();
				$("#tr682").show();
				$("#tr683").show();
				$("#tr684").show();
				$("#tr685").show();
				$("#tr686").show();
				$("#tr327").hide();
				$("#tr687").show();
				}
	}
	function read681(){
				if($("#radio681_1").attr("checked")){
				$("#f681").hide();
				$("#n681").hide();
			}else{
				$("#f681").show();
				$("#n681").show();
			}
			}
</script>
</body>
</html>
